/*
 * @Author: “lichen”
 * @Date: 2023-05-23 10:04:04
 * @LastEditors: “lichen”
 * @LastEditTime: 2023-06-07 14:29:54
 * @Description: 
 */
const { override, fixBabelImports, addWebpackAlias, overrideDevServer } = require("customize-cra");
const path = require("path");
const resolve = _path => path.resolve(__dirname, _path)
const rewirePostcss = require("react-app-rewire-postcss");
module.exports = override(
  fixBabelImports("import", {
    libraryName: "antd-mobile",
    style: "css",
  }),
  addWebpackAlias({
    '@': resolve("./src")
  }),
  (config, env) => {
    rewirePostcss(config, {
      plugins: () => [
        require("postcss-pxtorem")({
          rootValue: 375/10, // 375为设计稿宽度
          propList: ["*"],
          mediaQuery: true,
        }),
      ],
    });
    return config;
  },
);

